package com.hotel.comm.bean.company;

import com.hotel.comm.bean.EnumConstants.CompanyNature;
import com.hotel.comm.bean.EnumConstants.CompanySize;
import com.hotel.comm.bean.EnumConstants.IsOnline;
import com.hotel.comm.bean.EnumConstants.IsVerify;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name = "tt_ejob_company")
public class EjobCompany implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 3219413487134891L;
    @Id
    @GeneratedValue
    private Long id;
    /**
     * 公司名称
     */
    @Column(name = "company_name")
    private String companyName;
    /**
     * 公司简称
     */
    @Column(name = "company_short_name")
    private String companyShortName;

    /**
     * 公司介绍描述
     */
    @Lob
    @Column(name = "company_desc", columnDefinition = "text")
    private String companyDesc;
    /**
     * 公司性质
     */
    @Column(name = "company_nature")
    @Enumerated(EnumType.STRING)
    private CompanyNature companyNature;
    /**
     * 公司评分
     */
    @Column(name = "company_score")
    private Integer companyScore;
    /**
     * 公司规模
     */
    @Column(name = "company_size")
    @Enumerated(EnumType.STRING)
    private CompanySize companySize;
    /**
     * 公司地址
     */
    @Column(name = "company_address")
    private String companyAddress;
    /**
     * 是否验证<br/>
     */
    @Column(name = "is_verify")
    @Enumerated(EnumType.STRING)
    private IsVerify isVerify;
    /**
     * 是否上线<br/>
     * 职位修改必须在下线状态才能修改
     */
    @Column(name = "is_online")
    @Enumerated(EnumType.STRING)
    private IsOnline isOnline;
    /**
     * 创建时间
     */
    @Column(name = "create_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDate;
    /**
     * 更新时间
     */
    @Column(name = "update_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateDate;
    /**
     * 刷新日期<br>
     * 初始化创建时，刷新日期为创建日期<br/>
     * 更新后，刷新日期为上线时的日期(更新需先下线)<br>
     * 企业刷新后，同时更新发布的职位日期
     */
    @Column(name = "reflesh_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date refleshDate;

    /**
     * 企业关联的企业用户
     */
    @OneToOne
    @JoinColumn(name = "company_user_id")
    private EjobCompanyUser ejobCompanyUser;

    /**
     * 企业所有的部门(默认懒加载)
     *//*
    @OneToMany(mappedBy = "ejobCompany")
    private List<EjobDepartment> ejobDepartmentList;

    *//**
     * 企业关联的评价(默认懒加载)
     *//*
    @OneToMany(mappedBy = "ejobCompany")
    private List<EJobCompanyComment> eJobCompanyCommentList;

    */

    /**
     * 所属企业的职位(默认懒加载)
     *//*
    @OneToMany(mappedBy = "ejobCompany")
    private List<EjobCompanyPosition> ejobCompanyPositionList;

    public List<EjobCompanyPosition> getEjobCompanyPositionList() {
        return ejobCompanyPositionList;
    }

    public void setEjobCompanyPositionList(List<EjobCompanyPosition> ejobCompanyPositionList) {
        this.ejobCompanyPositionList = ejobCompanyPositionList;
    }

    public List<EJobCompanyComment> geteJobCompanyCommentList() {
        return eJobCompanyCommentList;
    }

    public void seteJobCompanyCommentList(List<EJobCompanyComment> eJobCompanyCommentList) {
        this.eJobCompanyCommentList = eJobCompanyCommentList;
    }
        public List<EjobDepartment> getEjobDepartmentList() {
        return ejobDepartmentList;
    }

    public void setEjobDepartmentList(List<EjobDepartment> ejobDepartmentList) {
        this.ejobDepartmentList = ejobDepartmentList;
    }
    */
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCompanyDesc() {
        return companyDesc;
    }

    public void setCompanyDesc(String companyDesc) {
        this.companyDesc = companyDesc;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyShortName() {
        return companyShortName;
    }

    public void setCompanyShortName(String companyShortName) {
        this.companyShortName = companyShortName;
    }

    public CompanyNature getCompanyNature() {
        return companyNature;
    }

    public void setCompanyNature(CompanyNature companyNature) {
        this.companyNature = companyNature;
    }

    public Integer getCompanyScore() {
        return companyScore;
    }

    public void setCompanyScore(Integer companyScore) {
        this.companyScore = companyScore;
    }

    public CompanySize getCompanySize() {
        return companySize;
    }

    public void setCompanySize(CompanySize companySize) {
        this.companySize = companySize;
    }

    public String getCompanyAddress() {
        return companyAddress;
    }

    public void setCompanyAddress(String companyAddress) {
        this.companyAddress = companyAddress;
    }

    public IsVerify getIsVerify() {
        return isVerify;
    }

    public void setIsVerify(IsVerify isVerify) {
        this.isVerify = isVerify;
    }

    public IsOnline getIsOnline() {
        return isOnline;
    }

    public void setIsOnline(IsOnline isOnline) {
        this.isOnline = isOnline;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getRefleshDate() {
        return refleshDate;
    }

    public void setRefleshDate(Date refleshDate) {
        this.refleshDate = refleshDate;
    }

    public EjobCompanyUser getEjobCompanyUser() {
        return ejobCompanyUser;
    }

    public void setEjobCompanyUser(EjobCompanyUser ejobCompanyUser) {
        this.ejobCompanyUser = ejobCompanyUser;
    }

    /*	@Override
    public String toString(){
		return new GsonBuilder().create().toJson(this);
	}*/
}
